/*--------------------------------------------------------------------------------------------------
Yatak Operation System Project Copyright 2012-2013
Author : Ilya Churaev
Started : 4 Mar 2013		Updated : 4 Mar 2013
File Name : tcp.h			Purpose : Transmission Control Protocol Interface
--------------------------------------------------------------------------------------------------*/
#ifndef _YATAK_TCP_H
#define _YATAK_TCP_H

#ifdef __cplusplus
extern "C" {
#endif

struct s_tcphdr
{
	unsigned short	source;
	unsigned short	dest;
	unsigned int	seq;
	unsigned int	ack_seq;
	unsigned short	res1:4,
		doff:4,
		fin:1,
		syn:1,
		rst:1,
		psh:1,
		ack:1,
		urg:1,
		res2:2;
	unsigned short	window;
	unsigned short	check;
	unsigned short	urg_ptr;
};

/***************************************************************************/
/* Entry point for a received TCP packet.
/***************************************************************************/
//int tcp_rcv(struct s_net_buff *buff, struct s_net_device *dev);

void tcp_connect(struct s_socket *socket, struct s_sockaddr_in *daddr);

#ifdef __cplusplus
}
#endif

#endif